 |
API Documentation
|
|
|
185 virtual Item*
insertItem (
const std::string_view& text,
void* data,
Item* parent =
nullptr,
Item* afterThisOne =
nullptr) ;
Item * getParentItem() const
void setParentItem(Item *item)
void * getAttachedData() const
void setAttachedData(void *data)
bool getSelectOnRightClick() const
void setContextMenuCallback(contextMenuCreationCallback value)
A graphical tree view window.
Definition: TreeView.h:12
virtual Item * getSelectedItem()=0
std::function< bool(Component *caller, int absX, int absY)> contextMenuCreationCallback
Used by components when they need a context menu to be created.
Definition: CallbackRepository.h:151
void selectItemFromRelativeCursor(const nkMaths::Point &relCoords)
Holds information of a tree view item.
Definition: TreeView.h:19
virtual void changeItemLabel(Item *toChange, const std::string_view &label)
void setPrecedingItem(Item *item)
virtual void exportIntrospection(nkExport::Node *rootNode) override
Item * addChild(Item *child)
TreeView * getParentTree() const
Base class for any graphical component.
Definition: Component.h:12
virtual Item * getItemAtAbsoluteCursor(const nkMaths::Point &absCoords)=0
virtual void importClassFromTree(nkExport::Node *rootNode) override
virtual void clearItems()
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
std::function< bool(TreeView *caller, void *itemData)> treeSelectionCallback
Used by a nkWinUi::TreeView to signal a selection occurred inside.
Definition: CallbackRepository.h:96
Represents a 2D Point.
Definition: Point.h:12
virtual Item * insertItem(const std::string_view &text, void *data, Item *parent=nullptr, Item *afterThisOne=nullptr)
virtual void selectItem(Item *item)=0
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
virtual void deleteItem(Item *toDelete, bool keepChildrenOnUpper=false)
Item * getPrecedingItem() const
void disavowChild(Item *child)
virtual Item * getItemAtRelativeCursor(const nkMaths::Point &relCoords)=0
void selectItemFromItsData(void *data)
nkMemory::StringView getText() const
void setParentTree(TreeView *parent)
Encompasses all API of component NilkinsWinUi.
Definition: Button.h:7
treeSelectionCallback getSelectionCallback() const
Item * getItemFromData(void *data) const
void setSelectionCallback(treeSelectionCallback value)
void exportIntrospection(nkExport::Node *rootNode)
void setSelectionOnRightClick(bool value)
Item * getChild(unsigned int index) const
void selectItemFromAbsoluteCursor(const nkMaths::Point &absCoords)
void setText(const nkMemory::StringView &text)